package com.xms.sdk.core.query;

/**
 * <p>
 * DateGroupingFormatting
 * </p>
 *
 * @author migo
 * @since 2021/9/1
 */
public class DateGroupingFormatting {
    public static String getFormatting(DateGroupingType dgt)
    {
        String result = "yyyy-MM-dd";
        switch (dgt){
            case YEAR:
                result = "yyyy";
                break;
            case MONTH:
                result = "yyyy-MM";
                break;
            case DAY:
                result = "yyyy-MM-dd";
                break;
            case WEEK:
                result = "dddd";
                break;
        }
        return result;
    }
}
